﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LangManagement.ascx.cs" Inherits="Framework.Portal.Layouts.Admin.Components.Lang.LangManagement" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<table border="0" cellpadding="0" cellspacing="1" class="content" width="100%">
    <tr>
        <td class="postheader" width="60%" align="left" valign="top">
            <asp:UpdatePanel ID="upanelGridPortals" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnUpdate" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                    <table class="content" cellspacing="1" cellpadding="0" width="100%">                        
                        <tr>
                            <td class="header2" align="left">
                                <NS:Label ID="Label1" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="NAME" /></td>
                            <td class="header2" align="left">
                                <NS:Label ID="Label2" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="DESCRIPTION" /></td> 
                            <td class="header2" width="80" align="left">
                                <NS:Label ID="Label3" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="ACTION" /></td>                          
                        </tr>
                        <asp:Repeater ID="dgrPortals" runat="server" OnItemCommand="dgrPortals_ItemCommand" OnItemDataBound="dgrPortals_ItemDataBound">
                            <ItemTemplate>
                                <tr>
                                    <td class="post" align="left">
                                        <asp:LinkButton ID="NameEdit" runat="server" CommandName="editlang" CommandArgument='<%# Eval("ID") %>'
                                            Text='<%# Eval("LANGUAGE_CULTURE") %>' /></td> 
                                    <td class="post" align="left">
                                        <%# Eval("LANGUAGE_NAME")%></td>                                    
                                    <td class="post" align="left">
                                        <NS:ImageButton id="btnEditPortal" runat="server" localizedpage="IMAGEACTION" localizedtag="EDIT24" CommandArgument='<%# Eval("ID") %>' CommandName="editlang" />
                                        &nbsp;
                                        <NS:ImageButton id="btnDeletePortal" runat="server" localizedpage="IMAGEACTION" localizedtag="DELETE24" CommandArgument='<%# Eval("ID") %>' CommandName="deletelang" />                                       
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater> 
                        <tr>
                            <td class="postfooter" colspan="3" height="25">
                                &nbsp;</td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
        <td class="post" width="40%" align="left" valign="top">
            <asp:UpdatePanel ID="updatePanelAddPortal" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="dgrPortals" EventName="ItemCommand" />
                </Triggers>
                <ContentTemplate>
                   <table width="100%" cellspacing="1" cellpadding="0" border="0" class="content">
                        <tr>
                            <td class="header1" align="left" colspan="2">
                                <asp:Label ID="lblCommandName" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>                            
                            <td colspan="2" class="header2" height="18">
                                <asp:Label id="lblUpdateStatus" runat="server" ForeColor="Blue" Font-Bold="True"></asp:Label>
                            </td>
                        </tr>                        
                        <tr>
                            <td class="postheader" width="30%" align="left">
                                <NS:Label ID="Label4" runat="server" LocalizedPage="FORMCAPTION" LocalizedTag="ID" /></td>
                            <td class="post" width="70%" align="left">
                                <asp:Label ID="lblId" runat="server" Font-Bold="true"></asp:Label></td>
                        </tr>                       
                        <tr>
                            <td class="postheader" width="30%" align="left">
                               <NS:Label ID="Label5" runat="server" LocalizedPage="FORMCAPTION" LocalizedTag="NAME" /></td>
                            <td class="post" width="70%" align="left">
                                <asp:TextBox ID="txtCulture" runat="server" MaxLength="5" Width="100%"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="postheader" width="30%" align="left">
                                <NS:Label ID="Label6" runat="server" LocalizedPage="FORMCAPTION" LocalizedTag="NAME" /></td>
                            <td class="post" width="70%" align="left">
                                <asp:TextBox ID="txtName" runat="server" Width="100%"></asp:TextBox></td>
                        </tr>         
                        <tr>
                            <td class="postfooter" colspan="2" valign="middle" align="center">
                                <NS:Button LocalizedPage="ACTION" LocalizedTag="UPDATE" Authenticated="UPDATE" ID="btnUpdate" runat="server" CssClass="pbutton" OnClick="btnUpdate_Click" Text="Cập nhật" />
                                    &nbsp;
                                <NS:Button LocalizedPage="ACTION" LocalizedTag="CREATE" Authenticated="CREATE" ID="btnAdd" runat="server" CssClass="pbutton" OnClick="btnAdd_Click" Text="Thêm mới" />
                                &nbsp;
                                <NS:Button LocalizedPage="ACTION" LocalizedTag="RESET" ID="btnCancel" runat="server" CssClass="pbutton" Text="Huỷ" Width="60px" OnClick="btnCancel_Click" />
                            </td>
                        </tr>
                    </table>                
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
    </tr>
</table>